package mj.ocraptor.configuration.properties;

import mj.ocraptor.console.Platform;
import mj.ocraptor.console.Platform.Os;

public enum ConfigString {
  // *INDENT-OFF*
    DATABASE_FOLDER
  , FOLDERS_TO_INDEX
  , DEFAULT_LANGUAGE_FOR_OCR
  , DATABASE_NAME
  , TEXT_FILE_EXTENSIONS
  , XML_FILE_EXTENSIONS
  , OCRAPTOR_VERSION

  , LOGFILE_DIRECTORY
  , LOGFILE_THRESHOLD_OUTPUT
  , BUGTRACKER_URL
  , GITHUB_URL
  , AVAILABLE_LOCALES
  , DEFAULT_LOCALE
  , LAST_TIME_USED
  , LAST_TIME_MODIFIED
  , THEME
  , PASSWORDS_TO_USE
  , FILES_AND_DIRS_TO_IGNORE
  , STOP_WORDS

  , LAST_USED_CONFIGURATION
  , LAST_SESSION_CHECKPOINT

  , IMAGE_FILE_OPEN_CMD_
  , IMAGE_FILE_OPEN_CMD_LINUX
  , IMAGE_FILE_OPEN_CMD_WINDOWS
  , IMAGE_FILE_OPEN_CMD_OSX

  , TEXT_FILE_OPEN_CMD_
  , TEXT_FILE_OPEN_CMD_LINUX
  , TEXT_FILE_OPEN_CMD_WINDOWS
  , TEXT_FILE_OPEN_CMD_OSX

  , ARCHIVE_FILE_OPEN_CMD_
  , ARCHIVE_FILE_OPEN_CMD_LINUX
  , ARCHIVE_FILE_OPEN_CMD_WINDOWS
  , ARCHIVE_FILE_OPEN_CMD_OSX

  , EPUB_FILE_OPEN_CMD_
  , EPUB_FILE_OPEN_CMD_LINUX
  , EPUB_FILE_OPEN_CMD_WINDOWS
  , EPUB_FILE_OPEN_CMD_OSX

  , PDF_FILE_OPEN_CMD_
  , PDF_FILE_OPEN_CMD_LINUX
  , PDF_FILE_OPEN_CMD_WINDOWS
  , PDF_FILE_OPEN_CMD_OSX

  , PS_FILE_OPEN_CMD_
  , PS_FILE_OPEN_CMD_LINUX
  , PS_FILE_OPEN_CMD_WINDOWS
  , PS_FILE_OPEN_CMD_OSX

  , DJVU_FILE_OPEN_CMD_
  , DJVU_FILE_OPEN_CMD_LINUX
  , DJVU_FILE_OPEN_CMD_WINDOWS
  , DJVU_FILE_OPEN_CMD_OSX

  , MS_WORD_FILE_OPEN_CMD_
  , MS_WORD_FILE_OPEN_CMD_LINUX
  , MS_WORD_FILE_OPEN_CMD_WINDOWS
  , MS_WORD_FILE_OPEN_CMD_OSX

  , MS_EXCEL_FILE_OPEN_CMD_
  , MS_EXCEL_FILE_OPEN_CMD_LINUX
  , MS_EXCEL_FILE_OPEN_CMD_WINDOWS
  , MS_EXCEL_FILE_OPEN_CMD_OSX

  , MS_XPS_FILE_OPEN_CMD_
  , MS_XPS_FILE_OPEN_CMD_LINUX
  , MS_XPS_FILE_OPEN_CMD_WINDOWS
  , MS_XPS_FILE_OPEN_CMD_OSX

  , MS_PPT_FILE_OPEN_CMD_
  , MS_PPT_FILE_OPEN_CMD_LINUX
  , MS_PPT_FILE_OPEN_CMD_WINDOWS
  , MS_PPT_FILE_OPEN_CMD_OSX

  , MS_RTF_FILE_OPEN_CMD_
  , MS_RTF_FILE_OPEN_CMD_LINUX
  , MS_RTF_FILE_OPEN_CMD_WINDOWS
  , MS_RTF_FILE_OPEN_CMD_OSX

  , LO_WRITER_FILE_OPEN_CMD_
  , LO_WRITER_FILE_OPEN_CMD_LINUX
  , LO_WRITER_FILE_OPEN_CMD_WINDOWS
  , LO_WRITER_FILE_OPEN_CMD_OSX

  , LO_CALC_FILE_OPEN_CMD_
  , LO_CALC_FILE_OPEN_CMD_LINUX
  , LO_CALC_FILE_OPEN_CMD_WINDOWS
  , LO_CALC_FILE_OPEN_CMD_OSX

  , LO_IMPRESS_FILE_OPEN_CMD_
  , LO_IMPRESS_FILE_OPEN_CMD_LINUX
  , LO_IMPRESS_FILE_OPEN_CMD_WINDOWS
  , LO_IMPRESS_FILE_OPEN_CMD_OSX

  , APPLE_PAGES_FILE_OPEN_CMD_
  , APPLE_PAGES_FILE_OPEN_CMD_LINUX
  , APPLE_PAGES_FILE_OPEN_CMD_WINDOWS
  , APPLE_PAGES_FILE_OPEN_CMD_OSX

  , APPLE_NUMBERS_FILE_OPEN_CMD_
  , APPLE_NUMBERS_FILE_OPEN_CMD_LINUX
  , APPLE_NUMBERS_FILE_OPEN_CMD_WINDOWS
  , APPLE_NUMBERS_FILE_OPEN_CMD_OSX

  , APPLE_KEY_FILE_OPEN_CMD_
  , APPLE_KEY_FILE_OPEN_CMD_LINUX
  , APPLE_KEY_FILE_OPEN_CMD_WINDOWS
  , APPLE_KEY_FILE_OPEN_CMD_OSX

  , MS_PUB_FILE_OPEN_CMD_
  , MS_PUB_FILE_OPEN_CMD_LINUX
  , MS_PUB_FILE_OPEN_CMD_WINDOWS
  , MS_PUB_FILE_OPEN_CMD_OSX

  , MS_ONE_FILE_OPEN_CMD_
  , MS_ONE_FILE_OPEN_CMD_LINUX
  , MS_ONE_FILE_OPEN_CMD_WINDOWS
  , MS_ONE_FILE_OPEN_CMD_OSX

  , HTML_FILE_OPEN_CMD_
  , HTML_FILE_OPEN_CMD_LINUX
  , HTML_FILE_OPEN_CMD_WINDOWS
  , HTML_FILE_OPEN_CMD_OSX

  , XML_FILE_OPEN_CMD_
  , XML_FILE_OPEN_CMD_LINUX
  , XML_FILE_OPEN_CMD_WINDOWS
  , XML_FILE_OPEN_CMD_OSX

  , XOJ_FILE_OPEN_CMD_
  , XOJ_FILE_OPEN_CMD_LINUX
  , XOJ_FILE_OPEN_CMD_WINDOWS
  , XOJ_FILE_OPEN_CMD_OSX

  , ENML_FILE_OPEN_CMD_
  , ENML_FILE_OPEN_CMD_LINUX
  , ENML_FILE_OPEN_CMD_WINDOWS
  , ENML_FILE_OPEN_CMD_OSX

  , RSS_FEEDS_FILE_OPEN_CMD_
  , RSS_FEEDS_FILE_OPEN_CMD_LINUX
  , RSS_FEEDS_FILE_OPEN_CMD_WINDOWS
  , RSS_FEEDS_FILE_OPEN_CMD_OSX

  , EMAIL_FILE_OPEN_CMD_
  , EMAIL_FILE_OPEN_CMD_LINUX
  , EMAIL_FILE_OPEN_CMD_WINDOWS
  , EMAIL_FILE_OPEN_CMD_OSX

  , DIRECTORY_OPEN_CMD_
  , DIRECTORY_OPEN_CMD_LINUX
  , DIRECTORY_OPEN_CMD_WINDOWS
  , DIRECTORY_OPEN_CMD_OSX

  // *INDENT-ON*
  ;

  public String property() {
    return this.name();
  }

  /**
   *
   *
   * @param prefix
   * @return
   */
  public static ConfigString getByOs(ConfigString prefix) {
    return getByOs(prefix, Platform.getSystem());
  }

  /**
   *
   *
   * @param prefix
   * @param os
   * @return
   */
  public static ConfigString getByOs(ConfigString prefix, Os os) {
    for (ConfigString value : ConfigString.values()) {
      if (value.name().startsWith(prefix.name()) && value.name().endsWith(os.name())) {
        return value;
      }
    }
    return null;
  }
}
